package day04;
import java.util.Scanner;
public class demo02 {
    public static void main(String[] args) {
    Scanner sc=new Scanner(System.in);
    /*
        System.out.println("请输入你的年龄");
        int age=sc.nextInt();
        System.out.println("请输入商品价格");
        double price=sc.nextDouble();
        System.out.println("年龄为:"+age+",商品价格为:"+price);

     */
        /*
        System.out.println("请选择功能:1.存款 2.取款 3.查询余额 4.退卡");
        int commade=sc.nextInt();
        switch (commade){
            case 1:
                System.out.println("存款");
                break;
            case 2:
                System.out.println("取款");
                break;
            case 3:
                System.out.println("查询余额");
                break;
            case 4:
                System.out.println("退卡");
                break;
            default:
                System.out.println("输入错误");
        }

         */
/*
        int times=0;
        for (times=0;times<5;times++){
            System.out.println("行动是成功的阶梯");
        }

 */
/*
        int num=1;
        for (num=1;num<=9;num++){
            System.out.println(num+"*9="+num*9);
        }

 */
        /*
        int times=0;
        while (times<5){
            System.out.println("行动是成功的阶梯");
            times++;
        }

         */
        /*
        int num=(int)(Math.random()*1000+1);
        System.out.println(num);
        int guess;
        do {
            System.out.println("猜吧");
            guess=sc.nextInt();
            if (guess>num){
                System.out.println("猜大了");
            }else if (guess<num){
                System.out.println("猜小了");
            }else{
                System.out.println("恭喜你");
            }
        }while (guess!=num);

         */
        /*
        int num=0;
        for (int a=1;a<=100;a++){
            num=num+a;
        }
        System.out.println("输入的数为"+num);

        for (int a=1;a<=9;a+=2){
            System.out.println(a+"*9="+a*9);
        }

         */
        int count=0;
        for(int year=1900;year<=2023;year++) {
            if ((year % 4 == 0 && year % 400 != 0) || year % 400 == 0) {
                System.out.print(year + " ");
                count++;
                if (count % 10 == 0) {
                    System.out.println();
                }
            }
        }
        }
}
